// 预定缓存
const state = () => ({
  customer_name: null,
  customer_idcard: null,
  customer_mobile: null,
  start_date: null,
  end_date: null,
  rent_sn: null,
})
const getters = {
  customer_name: (state) => state.customer_name,
  customer_idcard: (state) => state.customer_idcard,
  customer_mobile: (state) => state.customer_mobile,
  start_date: (state) => state.start_date,
  end_date: (state) => state.end_date,
  rent_sn: (state) => state.rent_sn,
}
const mutations = {
  setName(state, customer_name) {
    state.customer_name = customer_name
  },
  setIdcard(state, customer_idcard) {
    state.customer_idcard = customer_idcard
  },
  setMobile(state, customer_mobile) {
    state.customer_mobile = customer_mobile
  },
  setStart(state, start_date) {
    state.start_date = start_date
  },
  setEnd(state, end_date) {
    state.end_date = end_date
  },
  setSn(state, rent_sn) {
    state.rent_sn = rent_sn
  },
}
const actions = {
  setName({ commit }, customer_name) {
    commit('setName', customer_name)
  },
  setIdcard({ commit }, customer_idcard) {
    commit('setIdcard', customer_idcard)
  },
  setMobile({ commit }, customer_mobile) {
    commit('setMobile', customer_mobile)
  },
  setStart({ commit }, start_date) {
    commit('setStart', start_date)
  },
  setEnd({ commit }, end_date) {
    commit('setEnd', end_date)
  },
  setSn({ commit }, rent_sn) {
    commit('setSn', rent_sn)
  },
}
export default { state, getters, mutations, actions }
